/**
 * Created by Administrator on 2015/4/29.
 */

var model = require('../model/model').model;
var dao = require('../model/dao').PromiseDao;
var app = require('../config').globalApp;
module.exports = {
    index: function(req, res){
        dao.find(model.ArticleModel, {}).done(function(doc){
            console.log(doc);
            res.render('index', {articles: doc, title: '首页'});
        });

    }
};
